



//<Sensor_Set>
void wind()
{
  wind_cout++;
}

void sensor_work()
{

    temperature = (float)bmp085GetTemperature(bmp085ReadUT())/10;
    //
  Serial.print("Temperature:[ ");
  Serial.print(temperature,1);
  Serial.println("  deg C ]");
    ///
    pressure =(float)bmp085GetPressure(bmp085ReadUP())/100;
    //
  Serial.print("Pressure:[ ");
  Serial.print(pressure,1);
  Serial.println("  hPa ]");
    ///
    delay(1000);
  ///////////
  BH1750_Init(BH1750_address);
    delay(200);
  //
  if(2==BH1750_Read(BH1750_address))
    {
        lux=((buff[0]<<8)|buff[1])/1.2;
        ///
        Serial.print("luminance:[ ");
        Serial.print(lux,DEC);
        Serial.println("  lux ]");
    }
   ///
    delay(1000);
  ////////////
    int chk = DHT11.read(DHT11_PIN);
    humidity =(float)DHT11.humidity;
  //
  Serial.print("Humidity:[ ");
  Serial.print(humidity,0);
  Serial.println(" % ]");
  ///
    delay(1000);
  ////////////
  float val;
  val = analogRead(1);
  dir = val/1023*360;
  //
  Serial.print("Wind Direction:[ ");
  Serial.print(dir);
  Serial.println("  deg ]");
  ///
    delay(1000);
  ////////////
  wind_cout=0;
  attachInterrupt(4,wind,FALLING);
    delay(10000); //In 10s How many it turns
  detachInterrupt(4);
  ///
  Serial.print("Speed:[ ");
  if(wind_cout==0)
      {
        wind_speed=0;
        //
        Serial.print(wind_speed,2);
      }
   else
        {
            wind_speed=6.28*0.04*wind_cout;// 2*pi*r*n
            wind_speed=wind_speed/10;
            Serial.print(wind_speed,2);
        }
  Serial.println("  ms ]");
}
